package com.itheima.dao;

import com.github.pagehelper.Page;
import com.itheima.entity.Result;
import com.itheima.pojo.CheckGroup;
import com.itheima.pojo.Permission;
import com.itheima.pojo.Role;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Set;

public interface RoleDao {
    Set<Role> findRoleById(Integer id);


    void add(Role role);

    Page<Role> findByCondition(String queryString);

    List<Role> findAll();


    Role findById(Integer id);

    List<Permission> findRoleAndPermission(Integer id);

    void update(Role role);

    void deleteRoleAndPermission(Integer id);

    void delete(Integer id);

    void addRoleAndpermission(@Param("id") Integer roleId,
                              @Param("permission") Permission permission);
}
